package cn.yshujia.service.impl;

import cn.yshujia.domain.entity.Like;
import cn.yshujia.mapper.LikeMapper;
import cn.yshujia.repository.LikeRepository;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @author YShuJia
 * @create 2024/12/20
 * @description LikeServiceImpl
 */

@Service
public class LikeServiceImpl extends ServiceImpl<LikeMapper, Like> implements IService<Like> {
	
	@Resource
	private LikeMapper mapper;
	
	@Resource
	private LikeRepository repository;
	
	public boolean updateLikeCount(Long userId, Long sourceId) {
		repository.update(userId, sourceId);
		return true;
	}
	
}

